package QizhongKaoshi;

import java.util.Scanner;
public class Kaoshi2 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        double ydl,dy,df;
        dy=scanner.nextInt();
        ydl=scanner.nextInt();
        if((dy<=0&&ydl>0)||(ydl<0)) {
            System.out.println("invalid value");
        } else if (dy<1000&&ydl<=180) {
            df=ydl*0.52;
            System.out.println(df);
        } else if (dy<1000&&ydl<=280) {
            df=ydl*0.57;
            System.out.println(df);
        } else if (dy<1000&&ydl>280) {
            df=ydl*0.82;
            System.out.println(df);
        } else if (dy>=1000&&dy<100000&&ydl<=180) {
            df=ydl*0.47;
            System.out.println(df);
        }
        else if (dy>=1000&&dy<100000&&ydl<=280) {
            df=ydl*0.52;
            System.out.println(df);
        }
        else if (dy>=1000&&dy<100000&&ydl>280) {
            df=ydl*0.77;
            System.out.println(df);
        }
    }
}
